This application incorporates by reference of Taiwan application Serial No. 091107169, filed Apr. 10, 2002.
1. Field of the Invention
The invention relates in general to a Universal Serial Bus (USB) upstream peripheral device, and more particularly to a scanner that may serve as a USB host.
2. Description of the Related Art
A Universal Serial Bus (USB) is a plug and play interface between a computer and a peripheral device. The USB allows the addition of a new device to the computer without having to add an adapter card or having to shut down the computer. Many kinds of peripheral devices can be connected, configured, used or removed while the computer is still running, and thus the Plug and Play (PnP) function allows the peripheral device to be installed (xe2x80x9cplugged inxe2x80x9d) and used immediately be used (xe2x80x9cplayed withxe2x80x9d). Furthermore, the data transfer rate conducted by the USB between the computer host and the peripheral devices is much faster. As a result, the USB is a popular type of interface fitted to most PCs available today.
Referring to the FIG. 1, it shows the drawing of the topology of a USB computer host and the peripheral devices. A USB host connects with the peripheral devices through the external hubs. A hub can be either attached directly to the peripheral devices, or attached to another hub, which is connected with the peripherals. The peripheral devices cannot directly interconnect to other peripherals. As shown by the example in FIG. 1, a USB host 102 is connected to the hub 104, which is directly connected to a peripheral device 106, or indirectly connected to the peripheral device 110 via the hub 108. Also, the peripheral device 106 and peripheral device 110 both are not attached to other peripherals. With the USB, the USB host 102, the peripheral device 106, and peripheral device 110 combine to form an information processing system 100, wherein the USB host 102 is the controller of the whole information processing system 100, which controls all operations of the peripheral device 106 and peripheral device 110. In other words, all functionalities of the peripheral device 106 and peripheral device 110 are controlled by the USB host 102.
Referring to FIG. 2A and FIG. 2B, they show the manner of interconnection among a conventional USB computer host 202, a scanner 204, and a printer 206. They also show a sort of information processing system 200. In FIG. 2A, the scanner 204 and the printer 206 are connected with the computer host 202 by the hub 203. Hence, the computer host 202 can control the scanner 204 for scanning, and can also transmit the print data to the printer 206 for printing as well. On the other hand, in FIG. 2B, the connecting manner of the computer host 202, the scanner 204 and the printer 206 can adopt not only a conventional USB interface but also an EPP interface as the connecting interface of the information processing system 200. If the information processing system 200 in FIG. 2B applies the EPP interface, the computer host 202 can manipulate the scanner 204 and the printer 206 to work respectively, and also the scanner 204 can directly control the printing function of the printer 206, so as to provide the scan-to-print function.
However, if a USB interface is applied to the connection structure of FIG. 2B, the following method may not be able to provide the scan-to-print function. Here the computer host 202 is connected to the scanner 204, and the scanner 204 is connected to the printer 206. The computer host 202 is connected to a hub, which is configured inside the scanner 204. For the purpose of clarity, in FIG. 2B, the hub inside the scanner 204 is not shown. The internal hub is connected with the scanner 204, and also provides another USB port to be connected with the printer 206. In the information processing system 200, the computer host 202 is the USB host, and the scanner 204 and the printer 206 are the peripheral devices. Under the control of the computer host 202, the scanner 204 and the printer 206 can perform the instructions of the computer host 202 respectively.
The scan-to-print function enables the image data to be scanned by the scanner and then printed by the printer immediately. It is becoming one of the convenient functions needed for performing information processing. However, if the computer host 202 applies a USB interface to connect with the scanner 204 and the printer 206, the scanner 204 and the printer 206 operate under the control of the computer host 202 because the computer host 202 is the only controller of the whole information processing system 200. The scanner 204 is a peripheral device and cannot replace the computer host 202 as the USB host to control the printer to print directly. Therefore, according to the structure of the FIG. 2B, the scanner 204 cannot transmit the scanned document to be printed by the printer 206 directly.
It is therefore an object of the invention to provide a scanner, which can be a virtual USB host to directly control a printer to print without going through an external host.
Accordingly, the object of the present invention is to provide the scanner capable of serving as a USB host. The scanner is connected with a computer host and a printer respectively, wherein the computer host is a USB host. The scanner includes a hub, a scanner component, a virtual printer component and an internal host. The computer host and scanner are both connected to the hub for transferring data from the computer host to the scanner and vice versa. The scanner component stores the initial setting data of the scanner. In addition, the virtual printer component is connected with the hub, so as to output data to the hub and receive data output by the hub. The virtual printer component stores the initial setting data of the printer. Furthermore, the internal host is connected respectively with the scanner component, the virtual printer component and the printer, so as to output data from the printer to the virtual printer component, and also output data respectively from the scanner component and the virtual printer component to the printer. With the virtual printer component and the internal host, the scanner can be the USB host, which can directly control the printer to print.
According to a preferred embodiment of the invention, the scanner provides the function of a USB host, by enabling the scanned image data to be directly transmitted to the printer for printing without being under the control of the computer host.
Other objects, features, and advantages of the invention will become apparent from the following detailed description of the preferred but non-limiting embodiment. The following description is made with reference to the accompanying drawings.